home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsISocketProvider.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  117 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Malcolm Smith  <malsmith@cs.rmit.edu.au>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  27.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #include "nsISupports.idl"
  40.  
  41. [ptr] native PRFileDescStar(struct PRFileDesc);
  42.  
  43. /**
  44.  * nsISocketProvider
  45.  */
  46. [noscript, uuid(00b3df92-e830-11d8-d48e-0004e22243f8)]
  47. interface nsISocketProvider : nsISupports
  48. {
  49.     /**
  50.      * newSocket
  51.      *
  52.      * @param aFamily
  53.      *        The address family for this socket (PR_AF_INET or PR_AF_INET6).
  54.      * @param aHost
  55.      *        The hostname for this connection.
  56.      * @param aPort
  57.      *        The port for this connection.
  58.      * @param aProxyHost
  59.      *        If non-null, the proxy hostname for this connection.
  60.      * @param aProxyPort
  61.      *        The proxy port for this connection.
  62.      * @param aFlags
  63.      *        Control flags that govern this connection (see below.)
  64.      * @param aFileDesc
  65.      *        The resulting PRFileDesc.
  66.      * @param aSecurityInfo
  67.      *        Any security info that should be associated with aFileDesc.  This
  68.      *        object typically implements nsITransportSecurityInfo.
  69.      */
  70.     void newSocket(in long            aFamily,
  71.                    in string          aHost, 
  72.                    in long            aPort,
  73.                    in string          aProxyHost,
  74.                    in long            aProxyPort,
  75.                    in unsigned long   aFlags,
  76.                    out PRFileDescStar aFileDesc, 
  77.                    out nsISupports    aSecurityInfo);
  78.  
  79.     /**
  80.      * addToSocket
  81.      *
  82.      * This function is called to allow the socket provider to layer a
  83.      * PRFileDesc on top of another PRFileDesc.  For example, SSL via a SOCKS
  84.      * proxy.
  85.      *
  86.      * Parameters are the same as newSocket with the exception of aFileDesc,
  87.      * which is an in-param instead.
  88.      */
  89.     void addToSocket(in long           aFamily,
  90.                      in string         aHost, 
  91.                      in long           aPort,
  92.                      in string         aProxyHost,
  93.                      in long           aProxyPort,
  94.                      in unsigned long  aFlags,
  95.                      in PRFileDescStar aFileDesc, 
  96.                      out nsISupports   aSecurityInfo);
  97.  
  98.     /**
  99.      * PROXY_RESOLVES_HOST
  100.      *
  101.      * This flag is set if the proxy is to perform hostname resolution instead
  102.      * of the client.  When set, the hostname parameter passed when in this
  103.      * interface will be used instead of the address structure passed for a
  104.      * later connect et al. request.
  105.      */
  106.     const long PROXY_RESOLVES_HOST = 1 << 0;
  107. };
  108.  
  109. %{C++
  110. /**
  111.  * nsISocketProvider implementations should be registered with XPCOM under a
  112.  * contract ID of the form: "@mozilla.org/network/socket;2?type=foo"
  113.  */
  114. #define NS_NETWORK_SOCKET_CONTRACTID_PREFIX \
  115.     "@mozilla.org/network/socket;2?type="
  116. %}
  117.